from django.db import models

# Create your models here.
class Book(models.Model):
    id = models.AutoField(primary_key=True)  # id 会自动创建,可以手动写入
    plat = models.CharField(max_length=32)  # 平台
    name = models.CharField(max_length=32)  # 名称
    store = models.CharField(max_length=32)  # 仓库
    branch = models.CharField(max_length=32)  # 分支
    carry = models.CharField(max_length=32)  # 执行类型
    creator = models.CharField(max_length=32)  # 创建者
    create_date = models.DateField()  # 创建时间
    operate = models.CharField(max_length=32)  # 操作

    def __str__(self):
        return self.name

    class Meta:
        db_table = "book"
        verbose_name = "图书"
        verbose_name_plural = verbose_name